<?php #20070415 http://www.framework.altervista.org/FrameWork/blocks/top/_02_hmenu.inc
define('BLOCKHMENU','1.00');

/************************************************************************/
/* FrameWork  test preview                                              */
/* ==================================================================== */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/


$theme=theme();
//hmenu.inc

//carica la lingua se esiste
$lang=lang();
switch($lang){
    case "en":
	define("_COMBOMENU","Other .....");
	break;

    default:
	define("_COMBOMENU","Altro .....");
	break;
}

?>

<div class='linguetta-body'>
<?php
    $fd=opendir("applications");
    while (false !== ($appname= readdir($fd))){
	if ($appname[0]!='.' && $appname[0]!='_')
	    $applist[$i++]=$appname;
    }
    closedir($fd);
    sort($applist);
    if(strpos(" ".$_SERVER['HTTP_USER_AGENT'],"MSIE"))$style="padding-top: 3px;";

    $a=0;
    foreach($applist as $appelement){
	$apptitle=apptitle($appelement); $accesskey=GetAccessKey($apptitle, $appelement);
	$appname=appname();

	if ($a==9){
	    echo "<select class='linguetta' class='select' onChange=\"location=''+this.value;\" >\n";
     	    echo "<option value='index.php?'>"._COMBOMENU."</option>\n";

	}
	if ($a>=9){
	    if($appelement!="$appname")
		echo "<option class='select' value='index.php?appname=$appelement'>".apptitle($appelement)."</option>";
	    else
		echo "<option class='select' selected value='index.php?appname=$appelement'>".apptitle($appelement)."</option>";
	}else{

	    if ($appelement!=findapp("applications",$appname)){
		echo "<span class='linguettaleft' ></span>";
		echo "<span class='linguetta' style=\"$style\" ><a accesskey=\"$accesskey\" href='index.php?appname=$appelement' >$apptitle <IMG src='themes/$theme/images/bullet2.gif' border=0 ></a></span>";
		echo "<span class='linguettaright'></span> ";
		}
	    else{
		echo "<span class='linguettaleft'></span>";
		echo "<span class='linguetta sel' style=\"$style\" ><a accesskey=\"$accesskey\" href='index.php?appname=$appelement' >$apptitle <IMG src='themes/$theme/images/bullet2.gif' border=0 ></a></span>";
		echo "<span class='linguettaright'></span> ";
	    }
	}
	$a++;
    }
    if ($a>=9){
	echo "</select>\n";
    }
?>
</div>

